package com.ruoyi.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 门店原料分类管理 store_raw_material_category
 *
 * @author ruoyi
 * @date 2025-05-27
 */
public class StoreRawMaterialCategory extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 分类ID，主键，自增唯一标识 */
    private Long id;

    /** 分类名称，例如“粮油”“乳制品”等，不允许为空 */
    @Excel(name = "分类名称，例如“粮油”“乳制品”等，不允许为空")
    private String categoryName;

    /** 分类编码，业务唯一标识码（如系统编码），不允许为空且唯一 */
    @Excel(name = "分类编码，业务唯一标识码", readConverterExp = "如=系统编码")
    private String categoryCode;

    /** 原料数，统计该分类下的原料数量，默认为0 */
    @Excel(name = "原料数，统计该分类下的原料数量，默认为0")
    private Long rawMaterialCount;

    /** 排序字段，用于控制分类在前端展示的顺序，默认为0（数字越小越靠前） */
    @Excel(name = "排序字段，用于控制分类在前端展示的顺序，默认为0", readConverterExp = "数=字越小越靠前")
    private Long sortOrder;

    /** 记录创建时间，默认为当前时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "记录创建时间，默认为当前时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /** 记录更新时间，默认为当前时间，更新时自动刷新 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "记录更新时间，默认为当前时间，更新时自动刷新", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedAt;

    /** 状态标识，0=禁用，1=启用（默认启用），用于控制分类是否可用 */
    @Excel(name = "状态标识，0=禁用，1=启用", readConverterExp = "默=认启用")
    private Integer isActive;

    /** 手机号 */
    @Excel(name = "手机号")
    private String phone;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }

    public void setCategoryName(String categoryName)
    {
        this.categoryName = categoryName;
    }

    public String getCategoryName()
    {
        return categoryName;
    }

    public void setCategoryCode(String categoryCode)
    {
        this.categoryCode = categoryCode;
    }

    public String getCategoryCode()
    {
        return categoryCode;
    }

    public void setRawMaterialCount(Long rawMaterialCount)
    {
        this.rawMaterialCount = rawMaterialCount;
    }

    public Long getRawMaterialCount()
    {
        return rawMaterialCount;
    }

    public void setSortOrder(Long sortOrder)
    {
        this.sortOrder = sortOrder;
    }

    public Long getSortOrder()
    {
        return sortOrder;
    }

    public void setCreatedAt(Date createdAt)
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt()
    {
        return createdAt;
    }

    public void setUpdatedAt(Date updatedAt)
    {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt()
    {
        return updatedAt;
    }

    public void setIsActive(Integer isActive)
    {
        this.isActive = isActive;
    }

    public Integer getIsActive()
    {
        return isActive;
    }

    public void setPhone(String phone)
    {
        this.phone = phone;
    }

    public String getPhone()
    {
        return phone;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("categoryName", getCategoryName())
                .append("categoryCode", getCategoryCode())
                .append("rawMaterialCount", getRawMaterialCount())
                .append("sortOrder", getSortOrder())
                .append("createdAt", getCreatedAt())
                .append("updatedAt", getUpdatedAt())
                .append("remark", getRemark())
                .append("isActive", getIsActive())
                .append("phone", getPhone())
                .toString();
    }
}
